#ifndef CINPUTMANAGER_H_
#define CINPUTMANAGER_H_

#include<SFML\Window\Keyboard.hpp>
#include<SFML\Window\Mouse.hpp>

static enum eMouseButton{ eRIGHT, eLEFT, eNONE};
	
struct sMouseState
{
	sf::Vector2i m_Pos;
	bool m_bPressed;
	eMouseButton m_eButton;
};

struct sCharKey
{
	sf::Keyboard::Key m_Key;
	char	m_cChar;
};

class CInputManager
{
private:
	sf::Mouse m_Mouse;
	sf::Keyboard m_Keyboard;
	sMouseState m_sLastKnownState;
	//Refference to the global window
	sf::Window *m_Window;
	bool m_bKeyWasDown;
public:
	CInputManager();
	~CInputManager();
	const sMouseState GetMouseState();
	const sMouseState LastKnownState();
	bool Init(sf::Window &window);
	void Shutdown();
	const sCharKey GetPressedKey();
	bool IsKeyDown(sf::Keyboard::Key key);
	void CheckKeyboardToClear();
	char GetCharacterFromKeyCode(sf::Keyboard::Key key);
};

#endif